﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using StructureMap;
using StructureMap.Attributes;
using StructureMap.Configuration.DSL;
using StructureMap.Configuration.DSL.Expressions;


namespace CarbonExchange.Bll
{
    public class CarbonExchangeBllRegistory : Registry
    {
        protected override void configure()
        {

            ForRequestedType<AmeeQuery.IAmeeSettingsReader>().TheDefaultIsConcreteType<AmeeQuery.AmeeSettingsReader>();

            ForRequestedType<AmeeQuery.IAmeeCommand>().TheDefaultIsConcreteType<AmeeQuery.AmeeCommand>().CacheBy(StructureMap.Attributes.InstanceScope.Hybrid);

            ForRequestedType<CarbonExchange.Dal.Context>().TheDefaultIs(() => new CarbonExchange.Dal.Context());

            base.configure();
        }
    }
}
